#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum Effect {
    Absorption,
    BadOmen,
    Blindness,
    ConduitPower,
    Darkness,
    DolphinsGrace,
    FireResistance,
    Glowing,
    Haste,
    HealthBoost,
    HeroOfTheVillage,
    Hunger,
    Infested,
    InstantDamage,
    InstantHealth,
    Invisibility,
    JumpBoost,
    Levitation,
    Luck,
    MiningFatigue,
    Nausea,
    NightVision,
    Oozing,
    Poison,
    RaidOmen,
    Regeneration,
    Resistance,
    Saturation,
    SlowFalling,
    Slowness,
    Speed,
    Strength,
    TrialOmen,
    Unluck,
    WaterBreathing,
    Weakness,
    Weaving,
    WindCharged,
    Wither,
}
impl Effect {
    #[doc = r" Try to parse an `Effect` from a resource location string."]
    pub fn from_name(name: &str) -> Option<Self> {
        let name = name.strip_prefix("minecraft:").unwrap_or(name);
        match name {
            "absorption" => Some(Self::Absorption),
            "bad_omen" => Some(Self::BadOmen),
            "blindness" => Some(Self::Blindness),
            "conduit_power" => Some(Self::ConduitPower),
            "darkness" => Some(Self::Darkness),
            "dolphins_grace" => Some(Self::DolphinsGrace),
            "fire_resistance" => Some(Self::FireResistance),
            "glowing" => Some(Self::Glowing),
            "haste" => Some(Self::Haste),
            "health_boost" => Some(Self::HealthBoost),
            "hero_of_the_village" => Some(Self::HeroOfTheVillage),
            "hunger" => Some(Self::Hunger),
            "infested" => Some(Self::Infested),
            "instant_damage" => Some(Self::InstantDamage),
            "instant_health" => Some(Self::InstantHealth),
            "invisibility" => Some(Self::Invisibility),
            "jump_boost" => Some(Self::JumpBoost),
            "levitation" => Some(Self::Levitation),
            "luck" => Some(Self::Luck),
            "mining_fatigue" => Some(Self::MiningFatigue),
            "nausea" => Some(Self::Nausea),
            "night_vision" => Some(Self::NightVision),
            "oozing" => Some(Self::Oozing),
            "poison" => Some(Self::Poison),
            "raid_omen" => Some(Self::RaidOmen),
            "regeneration" => Some(Self::Regeneration),
            "resistance" => Some(Self::Resistance),
            "saturation" => Some(Self::Saturation),
            "slow_falling" => Some(Self::SlowFalling),
            "slowness" => Some(Self::Slowness),
            "speed" => Some(Self::Speed),
            "strength" => Some(Self::Strength),
            "trial_omen" => Some(Self::TrialOmen),
            "unluck" => Some(Self::Unluck),
            "water_breathing" => Some(Self::WaterBreathing),
            "weakness" => Some(Self::Weakness),
            "weaving" => Some(Self::Weaving),
            "wind_charged" => Some(Self::WindCharged),
            "wither" => Some(Self::Wither),
            _ => None,
        }
    }
    pub const fn to_name(&self) -> &'static str {
        match self {
            Self::Absorption => "absorption",
            Self::BadOmen => "bad_omen",
            Self::Blindness => "blindness",
            Self::ConduitPower => "conduit_power",
            Self::Darkness => "darkness",
            Self::DolphinsGrace => "dolphins_grace",
            Self::FireResistance => "fire_resistance",
            Self::Glowing => "glowing",
            Self::Haste => "haste",
            Self::HealthBoost => "health_boost",
            Self::HeroOfTheVillage => "hero_of_the_village",
            Self::Hunger => "hunger",
            Self::Infested => "infested",
            Self::InstantDamage => "instant_damage",
            Self::InstantHealth => "instant_health",
            Self::Invisibility => "invisibility",
            Self::JumpBoost => "jump_boost",
            Self::Levitation => "levitation",
            Self::Luck => "luck",
            Self::MiningFatigue => "mining_fatigue",
            Self::Nausea => "nausea",
            Self::NightVision => "night_vision",
            Self::Oozing => "oozing",
            Self::Poison => "poison",
            Self::RaidOmen => "raid_omen",
            Self::Regeneration => "regeneration",
            Self::Resistance => "resistance",
            Self::Saturation => "saturation",
            Self::SlowFalling => "slow_falling",
            Self::Slowness => "slowness",
            Self::Speed => "speed",
            Self::Strength => "strength",
            Self::TrialOmen => "trial_omen",
            Self::Unluck => "unluck",
            Self::WaterBreathing => "water_breathing",
            Self::Weakness => "weakness",
            Self::Weaving => "weaving",
            Self::WindCharged => "wind_charged",
            Self::Wither => "wither",
        }
    }
}
